import ADVM from "../ADCore/MVVM/ADVM";

export default class VMDemoView extends Laya.Scene {
  dataContext: ADVM;
  constructor() {
    super();
  }
  createChildren() {
    super.createChildren();
    this.loadScene("Test/VMDemo");
  }
  onAwake() {
    this.complete();
  }
  complete() {
    console.debug("VM演示......");
    //alert(222);
    var nums = 0;
    var options = {
      el: this,
      data: {
        bean: {
          name: "张三",
        },
      },
      methods: {
        login: function () {
          this.options.data.bean.name = "李四" + nums++;
        },
        clickInfo: function (e) {
          //alert("成功点击!");
        },
      },
    };

    this.dataContext = new ADVM(options);
  }
}
